package com.itlong.cloud.inspect;

import com.itlong.cloud.POJO.DTO.property.PropertyInspectSettingDTO;
import com.itlong.cloud.POJO.VO.property.PropertyInspectSettingVO;
import com.itlong.cloud.utils.page.Page;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * <desc>
 *     巡检设置接口暴露
 * </desc>
 *
 * @createDate 2019/8/12
 */
@FeignClient(name = "inspect-service")
public interface IPropertyInspectSettingServiceClient {

    /**
     * <desc>
     *      添加巡检设置相关处理。
     * <desc/>
     *
     * @param  dto 巡检相关信息
     * @return
     * @author Juguang.S
     * @createDate 2019-12-24
     */
    @PostMapping(path = "/setting/saveInspectPoint")
    Integer saveInspectPoint(@RequestBody PropertyInspectSettingDTO dto) throws Exception;

    /**
     * <desc>
     *      获取巡检点编号 即蓝牙门禁deviceUnique。
     * <desc/>
     *
     * @param  dto 巡检点信息
     * @return
     * @author Juguang.S
     * @createDate 2019-12-24
     */
    @PostMapping(path = "/setting/getInspectPointNumber")
    List<String> getInspectPointNumber(@RequestBody PropertyInspectSettingDTO dto);

    /**
     * <desc>
     *      获取巡检设置相关分页列表。
     * <desc/>
     *
     * @param  dto 查询条件
     * @return 巡检分页集合
     * @author Juguang.S
     * @createDate 2019-12-24
     */
    @PostMapping(path = "/setting/getInspectInfoByPage")
    Page<PropertyInspectSettingVO> getInspectInfoByPage(@RequestBody PropertyInspectSettingDTO dto) throws Exception;

    /**
     * <desc>
     *      修改巡检设置相关状态。
     * <desc/>
     *
     * @param  dto 修改状态相关参数
     * @return
     * @author Juguang.S
     * @createDate 2019-12-24
     */
    @PostMapping(path = "/setting/updateInspectSettingStatus")
    Integer updateInspectSettingStatus(@RequestBody PropertyInspectSettingDTO dto);

    /**
     * <desc>
     *      校验巡检区域、巡检点、巡检路线、巡检计划的名称是否存在。
     * <desc/>
     *
     * @param  dto 巡检相关信息
     * @return
     * @author Juguang.S
     * @createDate 2019-12-25
     */
    @PostMapping(path = "/setting/isExistByInspectName")
    Integer isExistByInspectName(@RequestBody PropertyInspectSettingDTO dto);

    /**
     * <desc>
     *      删除巡检相关需校验是否与上级有所关联，有关联不允许删除。
     * <desc/>
     *
     * @param  dto 巡检信息
     * @return
     * @author Juguang.S
     * @createDate 2019-12-26
     */
    @PostMapping(path = "/setting/isRelationByInspect")
    Integer isRelationByInspect(@RequestBody PropertyInspectSettingDTO dto);

    /**
     * <desc>
     *      获取巡检路线详情。
     * <desc/>
     *
     * @param  dto 巡检路线ID
     * @return 巡检路线详情
     * @author Juguang.S
     * @createDate 2019-12-26
     */
    @PostMapping(path = "/setting/getInspectLineInfo")
    PropertyInspectSettingVO getInspectLineInfo(@RequestBody PropertyInspectSettingDTO dto);

    /**
     * <desc>
     *      获取巡检点列表。
     * <desc/>
     *
     * @param  dto 项目ID
     * @return 巡检点列表
     * @author Juguang.S
     * @createDate 2019-12-27
     */
    @PostMapping(path = "/setting/getInspectPointList")
    List<PropertyInspectSettingVO> getInspectPointList(@RequestBody PropertyInspectSettingDTO dto);

    /**
     * <desc>
     *      根据巡检相应ID获取名称。
     * <desc/>
     *
     * @param  dto 巡检相关信息
     * @return
     * @author Juguang.S
     * @createDate 2020-01-08
     */
    @PostMapping(path = "/setting/getInspectNameById")
    PropertyInspectSettingVO getInspectNameById(@RequestBody PropertyInspectSettingDTO dto);


}
